#define _CRT_SECURE_NO_WARNINGS 1
#include"List.h"
void Testcode1()
{
	LTNode* phead = ListInit();
	ListPushBack(phead, 1);
	ListPushBack(phead, 2);
	ListPushBack(phead, 3);
	ListPushBack(phead, 4);
	ListPushBack(phead, 5);

	ListPrint(phead);

	ListPushFront(phead, 10);
	ListPushFront(phead, 20);
	ListPushFront(phead, 30);
	ListPushFront(phead, 40);
	ListPushFront(phead, 50);

	ListPrint(phead);

	/*ListPopBack(phead);
	ListPopBack(phead);
	ListPopBack(phead);
	ListPopFront(phead);
	ListPopFront(phead);*/
	
	ListPrint(phead);
	ListDestroy(phead);
}
void Testcode2()
{
	LTNode* phead = ListInit();

	ListPushBack(phead, 1);
	ListPushBack(phead, 2);
	ListPushBack(phead, 3);
	ListPushBack(phead, 4);
	ListPushBack(phead, 5);

	ListPrint(phead);
	LTNode* pos = ListFind(phead, 3);
	ListInsert(pos, 100);
	ListPrint(phead);

	ListErase(pos);
	ListPrint(phead);

	ListDestroy(phead);
}
int main()
{
	//Testcode1();
	Testcode2();

	return 0;
}